package com.wangp.demo.entity;

import com.wangp.demo.anno.ValueChangeTrace;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

/**
 * @author <a href="mailto:wangpeng@i-baby.com" rel="nofollow">wp☠😘✨</a>
 * @version 0.0.1
 * @since 2025/8/14 22:35
 */
@Slf4j
@Getter
@Setter
@ValueChangeTrace
public class BaseDo implements IA {

    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    private Integer version;

    public void valueChangeCallback(String type, String fieldName, Object oldValue, Object newValue) {
        log.info("valueChangeCallback, type: {}, fieldName: {}, oldValue: {}, newValue: {}", type, fieldName, oldValue, newValue);
    }

    @Override
    public void close() {
        IA.super.close();
    }
}
